Skip to content

Conversation

@Mab879
Copy link
Member

@Mab879 Mab879 commented Jan 23, 2026

Description:

  • -j2 to -j$(nproc)
  • Parallelize ansible lint

Rationale:

Trying to reduce time in CI.

Review Hints:

Review the CI logs.

@Mab879 Mab879 added this to the 0.1.80 milestone Jan 23, 2026
@Mab879 Mab879 changed the title Move to nproc and Speed Up Move to nproc and Speed Up Ansible Lint Jan 23, 2026
@github-actions
Copy link

ATEX Test Results

Test artifacts have been submitted to Testing Farm.

Results: View Test Results
Workflow Run: View Workflow Details

This comment was automatically generated by the ATEX workflow.

@vojtapolasek vojtapolasek self-assigned this Jan 26, 2026
Copy link
Collaborator

@vojtapolasek vojtapolasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.
Claude warned me about few errors which seem relevant. What do you think?

run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Lint Ansible Roles
run: ansible-lint -x 204 -x experimental -x command-instead-of-module ./build/ansible_roles/*
run: find ./build/ansible_roles -mindepth 1 -maxdepth 1 -type d | xargs -P $(nproc) -I {} ansible-lint -x 204 -x experimental -x command-instead-of-module {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are using many pipes here, would adding something like set -eo pipefail make sense?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one pipe here and we assume the playbooks exist since the build worked so I don't think it is needed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In context of previous discussion it seems it is really not needed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I would agree with @vojtapolasek here - if the find doesn't find anything and throws an error, ansible-lint would normally scan CWD, but xargs takes over here because nothing was passed, and it simply exits with 0.

$ echo asdasd | xargs -P $(nproc) -I {} false {} ; echo $?
123

$ find /nonexistent | xargs -P $(nproc) -I {} false {} ; echo $?
find: ‘/nonexistent’: No such file or directory
0

Although if we (want to) rely on other steps throwing errors, that's probably fine.

@vojtapolasek
Copy link
Collaborator

@Mab879 I see there are some Ansible lint warnings produced... is this something what was not waived in the past or are these new findings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants